package cn.darkhorse.device.pojo;

import com.baomidou.mybatisplus.annotation.*;

import java.io.Serializable;
import java.math.BigDecimal;
import java.time.LocalDate;
import java.time.LocalDateTime;

import com.fhs.core.trans.anno.Trans;
import com.fhs.core.trans.constant.TransType;
import com.fhs.core.trans.vo.TransPojo;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Getter;
import lombok.Setter;
import org.springframework.format.annotation.DateTimeFormat;

/**
 * <p>
 *
 * </p>
 *
 * @author yangtianqi
 * @since 2024-11-06
 */
@Getter
@Setter
  @TableName("mes_device_consumable_info")
@ApiModel(value = "MesDeviceConsumableInfo对象", description = "")
public class MesDeviceConsumableInfo implements Serializable, TransPojo {

    private static final long serialVersionUID = 1L;

      @TableId(value = "id", type = IdType.AUTO)
      private Long id;

      @ApiModelProperty("登记编号")
      private String code;

      @ApiModelProperty("设备id")
      private Long deviceId;

      @ApiModelProperty("设备名称")
      private String deviceName;

      @ApiModelProperty("设备编号")
      private String deviceCode;

      @ApiModelProperty("开始使用时间")
      @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
      private LocalDateTime intoUseTime;


      @ApiModelProperty("耗材id")
      private Long consumableId;

      @ApiModelProperty("耗材名称")
      private String consumableName;


      @ApiModelProperty("耗材单位")
//      @Trans(type = TransType.DICTIONARY, key = "unit_type")
      private String consumableUnit;

      @TableField(exist = false)
      private String consumableUnitName;



      @ApiModelProperty("用量")
      private String quantity;

      @ApiModelProperty("登记人员")
      private String registrant;

      @TableField(updateStrategy = FieldStrategy.IGNORED)
      private String remark;

      private String picture;

      @ApiModelProperty("总金额")
      private BigDecimal totalAmount;

      @ApiModelProperty("单价")
      private BigDecimal price;

    private String createBy;

    private LocalDateTime createTime;

    @TableField(exist = false)
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    private LocalDate intoUseTimeStart;

    @TableField(exist = false)
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    private LocalDate intoUseTimeEnd;

}
